package com.kim.dingding.model;


import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author KimWu
 * @date 2020/6/16 23:24
 * @Description ：
 */
@Component
@Data
@ConfigurationProperties(prefix = "kim.dingding")
public class DingdingModel {

    public static String secret;

    public static String webhook;

    public static String msgType;

    public static String mobile;

    @Value("${kim.dingding.secret}")
    public void setSecret(String secret) {
        DingdingModel.secret = secret;
    }

    @Value("${kim.dingding.webhook}")
    public void setWebhook(String webhook) {
        DingdingModel.webhook = webhook;
    }

    @Value("${kim.dingding.msgType}")
    public void setMsgType(String msgType) {
        DingdingModel.msgType = msgType;
    }

    @Value("${kim.dingding.mobile}")
    public void setMobile(String mobile) {
        DingdingModel.mobile = mobile;
    }
}
